// GET api/hoj/problems
import request from "@/utils/request.js";

export function getHOJProblemsList(params) {
    return request({
        url: '/api/hoj/problems',
        method: 'get',
        params
    })
}

export function getProblemDetail(problemId) {
    return request({
        url: `/api/hoj/problems/${problemId}`,
        method: 'get'
    })
}

export function submitTest(data) {
    return request({
        url: '/api/hoj/test-judgement',
        method: 'post',
        data
    })
}

export function getJudgeResult(testJudgeKey) {
    return request({
        url: `/api/hoj/test-judgement-result?testJudgeKey=${testJudgeKey}`,
        method: 'get'
    })
}